Options -Indexes

DirectoryIndex index.html /.cms/index.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    # http to https
    #RewriteCond %{HTTPS} off
    #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # . -> www
    #RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # www -> .
    #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    #RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

    # .hidden files
    RewriteCond %{THE_REQUEST} "^(GET|POST|HEAD) (^|/)\.(.*) HTTP/[0-9.]+$"
    RewriteRule ^ - [F]

    #AcceptPathInfo Off
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*)$ /.cms/index.php
</IfModule>

#<IfModule mod_expires.c>
#    ExpiresActive On
#    ExpiresDefault "access plus 1 week"
#</IfModule>
#
#<IfModule mod_deflate.c>
#    SetOutputFilter DEFLATE
#</IfModule>
